#include <iostream>
#include "CowString.h"

void test1(){
    CowString string1("hello");
    CowString string2 = string1;
    CowString string3 = string2;
    CowString string4 = string3;
    cout << string1.useCount() << endl;
    cout << string2.useCount() << endl;
    cout << string3.useCount() << endl;
    cout << string4.useCount() << endl;

    cout << string1[0] << endl;
    cout << string1.useCount() << endl;

    string1[0] = 'H';
    cout << string1[0] << endl;
    cout << string1.useCount() << endl;

}


int main() {
    test1();
    return 0;
}
